function animate(el, target) {

    el.timer = setInterval(function () {
        let leader = el.offsetLeft;
        let step = 10.283848;
        step = leader > target ? -step : step;
        if (Math.abs(target - leader) > Math.abs(step)) {
            leader = leader + step;
            el.style.left = leader + "px";
        } else {
            el.style.left = target + "px";
            clearInterval(el.timer);
        }
    }, 15)
}

